#! /bin/bash

hive  -S -e  "
--==========访问与咨询主题表========
CREATE TABLE IF NOT EXISTS bxg_dws.dws_visitor_daycount
(
    /`year`/                       STRING               COMMENT '年',
    year_quarter                 STRING               COMMENT '季度',
    year_month                   STRING               COMMENT '月',
    year_month_day               STRING               COMMENT '天',
    year_month_day_hour          STRING               COMMENT '小时',
    area                         STRING 			  COMMENT '地域',
    seo_source                   STRING 			  COMMENT '搜索来源',
    origin_channel               STRING 			  COMMENT '投放渠道',
    from_url                     STRING		          COMMENT '会话来源页面',
    group_type                   STRING               COMMENT '分组类型',
    time_type                    STRING               COMMENT '时间分组',
    sid_total                    bigint               COMMENT '总访客量',
    ip_total                     bigint               COMMENT '总IP个数',
    session_id_total             bigint               COMMENT '总会话个数'
)
COMMENT '访问与咨询主题表'
ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t'
stored as orc
tblproperties ('orc.compress'='SNAPPY');

"